import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        //输入s1buffer
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        StringBuffer s1buffer = new StringBuffer(s);

        //完成s2Buffer的填充
        StringBuffer s2buffer = new StringBuffer();
        for(int i = 0; i<s1buffer.length(); i++){
            char c = s1buffer.charAt(i);
            if(isLegal(c)){
                s2buffer.append(c);
            }
        }

        //准备原字符串
        String str1 = s2buffer.toString();
        str1 = str1.toLowerCase();

        //准备新字符串
        s2buffer = s2buffer.reverse();
        String str2 = s2buffer.toString();
        str2 = str2.toLowerCase();

        if(str1.equals(str2)){
            System.out.println("true");
        }else{
            System.out.println("false");
        }
    }

    //判断字符是否合法
    public static boolean isLegal(char c){
        if(c>='a'&& c<='z' || c >='A' && c <= 'Z' || c>='0' && c<='9'){
            return true;
        }else{
            return false;
        }
    }
}
